package com.ljx.List;

import com.ljx.Dynamic.ListNode;

/**
 * @author 李加喜
 * @Package com.ljx.List
 * @date 2021-11-06 10:48
 */
//链表中点
public class ListMidle {
    public static void main(String[] args) {

    }
    public ListNode middleNode(ListNode head) {
        ListNode slow=head,first=head;
        while (first!=null && first.next!=null){
            slow=slow.next;
            first=first.next.next;
        }
        return slow;
    }
}
